package cz.muni.fi.pa165.creatures.ejb.services;

import java.util.List;

import javax.ejb.Local;

import cz.muni.fi.pa165.creatures.ejb.model.Creature;

/*
 * @author smikloso
 */
@Local
public interface CreatureServiceLocal {

    /**
     * This method creates a creature.
     *
     * @param creature creature to create
     */
    void create(Creature creature);

    /**
     * This method removes a creature.
     *
     * @param creature creature to remove
     */
    void remove(Creature creature);

    /**
     * This method updates already existing creature.
     *
     * @param creature creature to update
     */
    void update(Creature creature);

    /**
     * This method gets a creature of some {@code id}.
     *
     * @param id id of the creature we want to get
     * @return creature of specified {@code id}, null otherwise
     */
    Creature get(Long id);

    /**
     * This method returns count of creatures in our simple world.
     *
     * @return number of the all creatures
     */
    Long getCount();

    /**
     * This method returns all creatures in our simple world.
     *
     * @return a list of all creatures
     */
    List<Creature> getAll();

    /**
     * This method returns creature by its name
     *
     * @param name name of the creature to get
     * @return creature of the specific name
     */
    public Creature getByName(String name);
}
